class Message<T>{
    private T message;

    public T getMessage() {
        return message;
    }

    public void setMessage(T message) {
        this.message = message;
    }
}

public class Test {
   /* public static void func(Message<Integer> message){
        System.out.println(message.getMessage());
    }*/
    public static void func(Message<String> message){
        System.out.println(message.getMessage());
    }
    public static void main(String[] args) {
        Message<Integer> message = new Message<>();
        message.setMessage(10);
        //func(message);

        Message<String> message2 = new Message<>();
        message2.setMessage("hello");
        func(message2);
    }
}

